#include #include #include "StarshipData.h" using namespace std; int main() { cout << "Which file(s) to open?\n"; cout << "1. friendlyships.shp" << endl; cout << "2. enemyships.shp" << endl; cout << "3. Both files" << endl; int option; cin >> option; Starship data; if (option == 1) { data.loadFriendlyShips("friendlyships.shp"); } else if (option == 2) { data.loadEnemyShips("enemyships.shp"); } else if (option == 3) { data.loadFriendlyShips("friendlyships.shp"); data.loadEnemyShips("enemyships.shp"); } else { cout << "Invalid Option!" << endl; } while (option != 6) { cout << "1. Print all ships" << endl; cout << "2. Starship with the strongest weapon" << endl; cout << "3. Strongest starship overall" << endl; cout << "4. Weakest ship (ignoring unarmed)" << endl; cout << "5. Unarmed ships" << endl; cout << "6. Exit" << endl; cin >> option; switch (option) { case 1: data.printFrienlyShips(); data.printEnemyShips(); break; case 2: data.printShipWithStrongWeapon(); break; case 3: data.printStongestShip(); break; case 4: data.printWeakestShip(); break; case 5: data.printUnarmedShips(); break; default: break; } break; } return 0; }